﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //创建数据源
        string[] firstexample = { "Sco", "ASP.NET", "LINQ", "XML", "SQL" };
        //创建查询
        IEnumerable<string> result = from str in firstexample
                                     where str.StartsWith("S")
                                     //orderby str descending
                                     select str;
        //执行查询
        foreach (string s in result)
        {
            Label1.Text += s + "<br>";
        }
    }
}